﻿<Page x:Class="Sport_Orders.Program.Pages.AddEditTovar"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:Sport_Orders.Program.Pages"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="AddEditTovar">
    <Grid Background="White">
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <!--Метки-->
        <Label Content="Фото"
               FontSize="25"
               HorizontalAlignment="Right"
               VerticalAlignment="Center"/>
        <Label Content="Название"
               Grid.Row="1"
               FontSize="25"
               HorizontalAlignment="Right"
               VerticalAlignment="Center"/>
        <Label Content="Производитель"
               Grid.Row="2"
               FontSize="25"
               HorizontalAlignment="Right"
               VerticalAlignment="Center"/>
        <Label Content="Цена"
               Grid.Row="3"
               FontSize="25"
               HorizontalAlignment="Right"
               VerticalAlignment="Center"/>
        <Label Content="Скидка"
               Grid.Row="4"
               FontSize="25"
               HorizontalAlignment="Right"
               VerticalAlignment="Center"/>
        <Label Content="Количество"
               Grid.Row="5"
               FontSize="25"
               HorizontalAlignment="Right"
               VerticalAlignment="Center"/>
        
        <!--Поля вставки-->
        <Grid Grid.Column="1">
            
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            
            <TextBox Name="TxbPhoto"
                     Margin="10 10 0 10"
                     Text="{Binding photo}"
                     FontSize="25"
                     VerticalContentAlignment="Center"/>

            <Button Name="BtnChoosePhoto"
                    Grid.Column="1"
                    Margin="10"
                    FontSize="25"
                    Content="Выбрать"
                    Click="BtnChoosePhoto_Click"/>

        </Grid>
        <TextBox Name="TxbNameTovar"
                 Grid.Row="1"
                 Text="{Binding nameTovar}"
                 Grid.Column="1"
                 FontSize="25"
                 Margin="10"
                 VerticalContentAlignment="Center"/>
        <TextBox Name="TxbVendor"
                 Grid.Row="2"
                 Text="{Binding vendor}"
                 Grid.Column="1"
                 FontSize="25"
                 Margin="10"
                 VerticalContentAlignment="Center"/>
        <TextBox Name="TxbPrice"
                 Grid.Row="3"
                 Text="{Binding price}"
                 Grid.Column="1"
                 FontSize="25"
                 Margin="10"
                 VerticalContentAlignment="Center"/>
        <TextBox Name="TxbDiscount"
                 Grid.Row="4"
                 Grid.Column="1"
                 Text="{Binding discount}"
                 FontSize="25"
                 Margin="10"
                 VerticalContentAlignment="Center"/>
        <TextBox Name="TxbCount"
                 Grid.Row="5"
                 Text="{Binding countTovar}"
                 Grid.Column="1"
                 FontSize="25"
                 Margin="10"
                 VerticalContentAlignment="Center"/>
        
        <!--Кнопки внизу-->
        <Button Name="BtnBack"
                Content="Назад"
                FontSize="25"
                Margin="10 10 0 10"
                Grid.Row="6"
                Click="BtnBack_Click"/>
        <Button Name="BtnSaveTovar"
                Content="Сохранить"
                FontSize="25"
                Margin="10"
                Grid.Row="6"
                Grid.Column="1"
                Click="BtnSaveTovar_Click"/>

    </Grid>
</Page>
